<template>
	<view class="pb40r">
		<view class="disFlex aliItCenter pl20r pr20r h100r borB1SE8e8e8">
			<view class="w160r">
				账户名：
			</view>
			<view class="flex1 teAliRight colCcc">
				{{userInfo.username ? userInfo.username : ''}}
			</view>
		</view>
		<view class="disFlex aliItCenter pl20r pr20r h100r borB1SE8e8e8">
			<view class="w160r">
				保洁名：
			</view>
			<view class="flex1 teAliRight colCcc">
				{{userInfo.name ? userInfo.name : ''}}
			</view>
		</view>
		<view class="disFlex aliItCenter pl20r pr20r h100r borB1SE8e8e8">
			<view class="w160r">
				微信：
			</view>
			<view class="flex1 teAliRight colCcc">
				{{
					userInfo.is_bind == 1 ? '未绑定' :
					userInfo.is_bind == 2 ? '已绑定' : userInfo.is_bind
				}}
			</view>
		</view>
		<view class="disFlex aliItCenter pl20r pr20r h100r borB1SE8e8e8">
			<view class="w160r">
				茶室tid：
			</view>
			<view class="flex1 teAliRight colCcc">
				{{userInfo.tid ? userInfo.tid : ''}}
			</view>
		</view>
		<view class="disFlex aliItCenter pl20r pr20r h100r borB1SE8e8e8">
			<view class="w160r">
				账户：
			</view>
			<view class="flex1 teAliRight colCcc">
				{{
					userInfo.type == 1 ? '已启用' :
					userInfo.type == 2 ? '已禁用' : userInfo.type
				}}
			</view>
		</view>
		<view class="disFlex aliItCenter pl20r pr20r h100r borB1SE8e8e8">
			<view class="w160r">
				账户id：
			</view>
			<view class="flex1 teAliRight colCcc">
				{{userInfo.id ? userInfo.id : ''}}
			</view>
		</view>
		<view @click="cliOutLogin"
			class="w710r lh80r teAliCenter borRad10r colC62e19 bor1SC62e19 mAuto mt40r"
		>
			退出当前账号
		</view>
	</view>
</template>
<script>
import { inquiryToLogin } from '@/utils/utils.js'
export default {
	data() {
		return {
			userInfo: {},
		}
	},
	onShow() {
		inquiryToLogin().then(res => {
			this.userInfo = uni.getStorageSync('userInfo');
			console.log(this.userInfo)
		});
	},
	methods: {
		cliOutLogin() {
			uni.showModal({
				title: '提示',
				content: '确定退出登录？',
				confirmColor: '#64aeb4',
				success:res => {
					if (res.confirm) {
						uni.clearStorageSync();
						uni.navigateBack();
					}
				}
			})
		},
	}
}
</script>
<style>
</style>